import "reflect-metadata";
import { app, protocol } from "electron";
import { init, secondInstance } from "./vendor/init.ts";


const gotTheLock = app.requestSingleInstanceLock();
const start = async (): Promise<void> => {
  if (!gotTheLock) {
    app.quit();
    return;
  }

  await app.whenReady();
  init();
  app.on("window-all-closed", ()=>{});
  app.on("second-instance", secondInstance);
};

void start();
